Skip to content
This repository was archived by the owner on Apr 8, 2024. It is now read-only.

Add exit judgement for cgroupv1 only host #11

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

xu1zhou
Copy link
Contributor

@xu1zhou xu1zhou commented Jan 10, 2023

For lagacy system with only cgroupv1 enabled, since cgroupv2 is necessary for istio-tcpip-bypass to take effects. Program will just exit with error message for warning.

@xu1zhou xu1zhou requested a review from LuyaoZhong January 10, 2023 03:03
@@ -53,13 +53,17 @@ func getCgroupPath() (string, error) {
enabled, err := v2.Enabled()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to check if v2 is enabled first to determine raising error or not, and check if v1 is enabled to determine the path. Otherwise in current change, it returns "/sys/fs/cgroup" when both v1 and v2 enabled.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants